package com.zhiyou100.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author yang
 * @className Student
 * @packageName com.zhiyou100.entity
 * @Description TODO 学生类 目标类，有方法
 * @date 2020-08-19 14:24
 */

@AllArgsConstructor
@NoArgsConstructor
@Data
public class Student implements Serializable, StudentInterface {
    private Integer sid;
    private String sname;

    @Override
    public void study() {
        System.out.println(sname + " 正在努力学习!!");
    }

    @Override
    public void smoke() {
        System.out.println(sname + " 正在🚬");
        // 抛个异常
        //System.out.println(1 / 0);
    }

    @Override
    public void show() {
        System.out.println("我叫 " + sname + " 学号是 " + sid);
    }
}
